# Configuration Migration Guide

**Rsdoctor introduced new configuration options in version 1.2.4**. These new configuration options are easier to configure, more extensible, and compatible with the upcoming v2.0 release.

Configuration options from version 1.2.3 and earlier will still be supported, **but will be completely deprecated in Rsdoctor v2**, so we recommend migrating to the new configuration options in `1.2.4`.

| Original Configuration              | New Configuration                                                                                                              |
| ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| mode                                | Changed to configure `output.mode`.                                                                                            |
| brief                               | Changed to configure `mode: 'brief'`, and configure `output.options` `type` as `html`.                                         |
| output.compressData                 | Changed to configure `mode: 'brief'`, and configure `output.options.type` as `json`.                                           |
| `mode: 'lite'` or `feature: 'lite'` | Changed to configure `mode: 'normal'`, and configure `output.options.reportCodeType` as `noCode` or `noAssetsAndModuleSource`. |
| None                                | New `output.options.jsonOptions.section` configuration                                                                         |

## Configuration Changes Details

### mode

The `mode` in the original configuration is migrated to the nested `output.mode` for better integration with other output-related configurations.

### brief

The current brief report mode outputs an HTML file as the report page. The new brief mode still supports JSON format, and for unified management of the same configuration, the brief configuration is moved to output.options.
The original `brief` configuration is changed to configure `output.mode: 'brief'`, and configure `output.options` `type` as `html`.

### output.compressData

The original `output.compressData` configuration is changed to configure `mode: 'brief'`, and configure `output.options.type` as `json`.

### lite

The internal logic of lite mode is equivalent to `output.options.reportCodeType` being `noCode` or `noAssetsAndModuleSource`, mainly to solve the problem of large projects being too slow when opening reports or OOM during build.

Considering that users cannot clearly distinguish the actual meaning of lite mode, having too many modes is not conducive to management and configuration, and the `output.options.reportCodeType` configuration is clearer, so `mode: 'lite'` will be deprecated in the future V2 version.

The original `mode: 'lite'` and `feature: 'lite'` configurations are changed to configure `mode: 'normal'`, and configure `output.options.reportCodeType` as `noCode` or `noAssetsAndModuleSource`.

### output.options.jsonOptions.section

Support for the new `output.options.jsonOptions.section` configuration for more granular JSON output option customization. For specific sections configuration items, refer to [output.options.jsonOptions.section](/config/options/output#jsonoptionssection).
